﻿using Sys.Common;
using Sys.Core.Gen;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Raiders : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    //public string GetRaiders()
    //{
    //    System.Text.StringBuilder sb = new System.Text.StringBuilder();

    //    var list = NewBll.I.NewsByTag("Raiders").Take(6).ToList();

    //    sb.Append("<ul>");

    //    foreach (var item in list)
    //    {
    //        sb.Append("<li>");
    //        sb.Append("<a href='New.aspx?id=" + item.ID + "' target='_blank'>" + StringHelper.CutString(item.Name, 28) + "</a>");
    //        sb.Append("</li>");
    //    }

    //    sb.Append("</ul>");

    //    return sb.ToString();
    //}

    public string GetNews()
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();

        var list = NewBll.I.NewsByTag("News").Take(6).ToList();

        sb.Append("<ul>");

        foreach (var item in list)
        {
            sb.Append("<li>");
            sb.Append("<a href='New.aspx?id=" + item.ID + "' target='_blank'>" + StringHelper.CutString(item.Name, 28) + "</a>");
            sb.Append("</li>");
        }

        sb.Append("</ul>");

        return sb.ToString();
    }
}